# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
# Maintainer: Caleb Maclennan <caleb@alerque.com>
# Contributor: David Thurstenson <thurstylark@gmail.com>

pkgname=vim-ale
_gitcommit=31010ad1d1358f14c7025168f529a0f6e512138e
pkgver=3.3.0
pkgrel=1
pkgdesc='Asynchronous Lint Engine with Language Server Protocol (LSP) support'
url='https://github.com/dense-analysis/ale'
arch=('any')
license=('BSD')
depends=('vim-plugin-runtime')
optdepends=('shellcheck: for sh/bash support'
            'flake8: for python support')
makedepends=('git')
groups=('vim-plugins')
source=("git+${url}.git#commit=${_gitcommit}?signed")
sha512sums=('SKIP')
validpgpkeys=('E5132116F56ACE32A3D5D7DD0FC1ECAA8C81CD83') # _w0rp_ (Always be true to yourself) <devw0rp@gmail.com>

pkgver() {
  cd ale
  git describe --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

package() {
  cd ale
  install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
  install -dm 755 "${pkgdir}/usr/share/vim/vimfiles"
  cp -dr --no-preserve=ownership {ale_linters,autoload,doc,ftplugin,plugin,syntax} \
    "${pkgdir}/usr/share/vim/vimfiles"
}

# vim: ts=2 sw=2 et:
